//
//  ViewController.m
//  Custom drawing board
//
//  Created by 叶周翔 on 2016/11/10.
//  Copyright © 2016年 yezx. All rights reserved.
//

#import "ViewController.h"
#import "YZXPaintView.h"

@interface ViewController ()
@property (weak, nonatomic) IBOutlet YZXPaintView *paintView;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.paintView.lineWidth = 1;
}

- (IBAction)lineWidth:(UISlider *)sender {
    self.paintView.lineWidth = sender.value;
}

- (IBAction)setLineColor:(id)sender {
    UIButton *button = (UIButton *)sender;
    self.paintView.lineColor = button.backgroundColor;
}
- (IBAction)cleanScreen:(id)sender {
    [self.paintView clearScreen];
}
- (IBAction)goBack:(id)sender {
    [self.paintView goBack];
}
- (IBAction)eraser:(id)sender {
    [self.paintView eraser];
}

@end
